package com.jinsi.service.impl;

import com.jinsi.mapper.StuMapper;
import com.jinsi.pojo.Stu;
import com.jinsi.service.StuSerivce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StuSerivceImpl implements StuSerivce {

    @Autowired
    private StuMapper stuMapper;
    @Override
    public List<Stu> getAll() {
        return stuMapper.getAll();
    }

    @Override
    public List<Stu> getPageList(int pageSize, int pageNum) {
        return stuMapper.getPageList((pageNum-1)*pageSize,pageSize);
    }

    @Override
    public int getCount() {
        return stuMapper.getCount();
    }
}
